/* eslint-disable vue/no-v-html */
<template>
  <div>
    <el-dialog v-bind="$attrs" :before-close="beforeClose">
      <el-card class="business-card">
        <div v-html="formData" />
      </el-card>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" size="mini" @click="beforeClose">
          关闭
        </el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    formData: {
      type: String,
      default: ''
    },
    beforeClose: {
      type: Function,
      default: () => {}
    }
  },
  data() {
    return {
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/ .business-card.el-card {
  background-color: #efefef;
  max-height: 450px;
  overflow-y: auto;
}

</style>
